package com.zzrc.grape.controller;


import com.zzrc.grape.service.OrderService;
import com.zzrc.grape.service.SmsService;
import com.zzrc.grape.util.BasePageData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;

@Controller
@RequestMapping("sms")
public class SmsController {
    protected Logger logger = LoggerFactory.getLogger(getClass());

    @Resource
    SmsService smsService;

    @RequestMapping("goSmsIndex")
    public ModelAndView goSmsIndex() {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("/sms/getSmsInfo");
        logger.info("访问/sms/getSmsInfo");
        return modelAndView;
    }

    @PostMapping(value = "getSmsInfo", consumes = "application/json;charset=UTF-8")
    @ResponseBody
    public BasePageData getSmsInfo() {
        return smsService.getSmsInfo();
    }
}

